package com.example.myapplication.navigation
import androidx.navigation.NavHostController
import androidx.navigation.NavOptionsBuilder

object NavigationManager {
    private  var navigationController : NavHostController? = null

    fun setNavController(navController: NavHostController?){
        navigationController = navController
    }

    fun navigate(route : String){
        navigationController?.navigate(route)
    }

    fun navigate(route: String, builder: NavOptionsBuilder.() -> Unit) {
        navigationController?.navigate(route, builder)
    }

    fun popBackStack(){
        navigationController?.popBackStack()
    }

}